GitHub

您所在的位置:网站首页 measurement template GitHub

GitHub

2023-07-05 08:19| 来源: 网络整理| 查看: 265

MeasurementLink™ Support for LabVIEW MeasurementLink™ Support for LabVIEW Introduction Software support Installation Developing a LabVIEW measurement Running a LabVIEW measurement Examples Using a measurement in InstrumentStudio Creating a LabVIEW executable for static registration Introduction

The MeasurementLink Support for LabVIEW packages enable measurement developers to quickly create LabVIEW measurements and run them as a service(gRPC). MeasurementLink allows users to interact with measurement services with a LabVIEW UI in InstrumentStudio.

Software support InstrumentStudio 2023 Q1 or later MeasurementLink 2023 Q1 or later LabVIEW 2020 SP1 or later JKI VI Package Manager 2020.1 or later Installation Install a supported version of InstrumentStudio Install a supported version of MeasurementLink Install a supported version of LabVIEW Download and install the MeasurementLink Support for LabVIEW packages in the following order. ni_lib_labview_grpc_library-x.x.x.x.vip - Required ni_lib_labview_grpc_servicer-x.x.x.x.vip - Required ni_measurementlink_service-x.x.x.x.vip - Required ni_measurementlink_generator-x.x.x.x.vip - Required Developing a LabVIEW measurement

Create a new LabVIEW project (say Measurement.lvproj) and open it.

From the project window, go to Tools → MeasurementLink → Create Measurement Plug-in... which opens a new measurement creation dialog.

In the new dialog, enter the Measurement Plug-in Name that you would like to give to the measurement and click Create Measurement Plug-in.

This will create a new measurement service library in the project with the required assets for developing a measurement service.

Add the measurement details in the block diagram of the Get Measurement Details.vi including:

display name version Service Class

Add the required controls for the configuration parameters in the Measurement Configuration.ctl file. By default, this comes with Array in which is a double array.

Add the required indicators for the output parameters in the Measurement Results.ctl file. By default, this comes with the Array out parameter which is a double array.

Provide the measurement logic in the Measurement Logic.vi block diagram. The diagram has an input cluster including the configuration parameters and an output cluster containing the output parameters from Measurement Configuration.ctl and Measurement Results.ctl. By default, the logic takes the Array in and sends it directly to Array out.

Create the user interface in Measurement UI.vi under the .lvlib. The control and indicator names in the user interface should match the Measurement Configuration and Measurement Results. If the data type and name match, then the data from the controls will be sent to the Measurement Logic.vi and the results will be published to the indicators after the measurement is run. By default, the UI file consists of an 'Array In' control and 'Array Out' indicator.

Note:

Additional info can be found in the to-do sections in the code, which can be viewed using the Bookmark Manager. You can open it from the View → Bookmark Manager menu. In this window, you can will find the bookmark term #MeasurementToDo. Double-clicking on the items will take you to the VI locations where changes need to be made for creating your unique measurement service. Scalars (int, double, uint, sint, string, boolean) and double array are the supported datatypes for the Configuration and Output parameters of the measurement. Running a LabVIEW measurement

To run the measurement service, follow the steps below

Open .lvproj that contains the Measurement Service library.

Start the discovery service if the measurement is to be used in InstrumentStudio.

Run the Run Service.vi from .lvlib to start the measurement service. A new window will appear, which provides basic information about the running service.

To manually stop the service, click on the STOP button on the window that appeared when the service was started.

Examples

The Source\Example Measurements directory contains example measurement services. See the README.md file there for more information.

Using a measurement in InstrumentStudio

For using LabVIEW measurements, install a supported version of MeasurementLink

To interact with a measurement in InstrumentStudio, follow the steps below:

Once all the packages are installed, open InstrumentStudio and click on Manual Layout.

Choose the desired measurement and create a panel.

The layout will be populated with the UI created for the measurement, containing the provided parameters.

Provide the required configurations and click RUN to run the measurement.

Creating a LabVIEW executable for static registration

A Build Specification is included with the generated measurement service. To create an executable for the measurement service, right-click the build specification and select Build.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3